package zezutom.joker.service;

import java.util.Collection;
import zezutom.joker.model.BadJokeException;
import zezutom.joker.model.Joke;
import zezutom.joker.model.Joker;
import zezutom.joker.model.RepeatedJokeException;

/**
 *
 * @author tomasz
 */
public interface FunnyService {

    /**
     * Wakes up a boring joker to tell something laughable.
     * 
     * @param id    joker id
     * @throws BadJokeException         exceptionally miserable performance
     * @throws RepeatedJokeException    repeated joke is not a joke!
     * 
     * @return a fine selection of unique jokes of a low level of stupidity (not guaranteed).
     */
    Collection<Joke> saySomethingFunny(Long id) throws BadJokeException, RepeatedJokeException;
    
    /**
     * 
     * @return  all of those amusing blokes.
     */
    Collection<Joker> loadCircus();
    
    /**
     * Don't be shy, come closer.. you clown!
     * 
     * @param id    joker id
     * @return found joker or null
     */
    Joker loadClown(Long id);
}
